perm filename GFD.DIF[MF,ALS] blob
sn#797278 filedate 1985-07-01 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00006 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00003 00002 1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 1,1
C00007 00003 1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 2,2
C00011 00004 1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 6,6
C00020 00005 1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 6,6
C00029 00006 1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 13,13
C00034 ENDMK
C⊗;
1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 1,1
**** File 1) GFTODO.WEB[MF,SYS]/1P/4L
1) C00003 00002 % This program is based on GFtype and in part contains material extracted from
1) C00007 00003 @* Introduction.
**** File 2) GFD.WEB[MF,ALS]/1P/4L
2) C00003 00002 % This program by A. L. Samuel is not copyrighted and can be used freely.
2) C00007 00003 @* Introduction.
***************
**** File 1) GFTODO.WEB[MF,SYS]/1P/9L
1) C00053 00007 @* Input and Output for binary files.
1) C00063 00008 @* Reading the gf information.
1) C00071 00009 @* Translating the input commands. This section will be largely concerned with
1) C00077 00010 @* Processing and writing out the raster information.
1) C00086 00011 @ Reading the postamble.
1) C00092 00012 @* OC file format.
1) C00111 00013 @* The main program.
1) C00117 00014 @* Index.
1) C00118 ENDMK
1) C⊗;
1) % This program is based on GFtype and in part contains material extracted from
**** File 2) GFD.WEB[MF,ALS]/1P/9L
2) C00055 00007 @* Input and Output for binary files.
2) C00065 00008 @* Reading the gf information.
2) C00075 00009 @* Translating the input commands.
2) C00081 00010 @* Processing and writing out the raster information.
2) C00090 00011 @ Reading the postamble.
2) C00096 00012 @* OC file format.
2) C00115 00013 @* The main program.
2) C00122 00014 @* Index.
2) C00123 ENDMK
2) C⊗;
2) % This program by A. L. Samuel is not copyrighted and can be used freely.
2) % This program is based on GFtype and in part contains material extracted from
***************
**** File 1) GFTODO.WEB[MF,SYS]/2P/6L
1) % Here is TeX material that gets inserted after \input webmac
**** File 2) GFD.WEB[MF,ALS]/2P/7L
2) % Version 0.3 to be issued in July 1985 is updated to accept the early 1985
2) % changes in the GF format that were incorporated in DVIIMP.
2) % Much of what is new is adapted from DVIIMP Version 0.91.
2) % Here is TeX material that gets inserted after \input webmac
***************
**** File 1) GFTODO.WEB[MF,SYS]/2P/36L
1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 2,2
1) \centerline{(Version 0.2, December 1984)}
1) \vfill}
**** File 2) GFD.WEB[MF,ALS]/2P/40L
2) \centerline{(Version 0.3, July 1985)}
2) \vfill}
***************
**** File 1) GFTODO.WEB[MF,SYS]/3P/12L
1) during early December 1984 and it expects the identification byte, |i|,
1) to be 130.
1) The |banner| string defined here should be changed whenever \.{GFtoDOVER}
1) gets modified.
1) @d banner=='This is GFtoDOVER, Version 0.2' {printed when the program starts}
1) @d resolution==384.0 {pixels per inch, as used in gf files}
**** File 2) GFD.WEB[MF,ALS]/3P/12L
2) during early 1985 and it expects the identification byte, |i|,
2) to be 131.
2) The |banner| string defined here should be changed whenever \.{GFtoDOVER}
2) gets modified.
2) @d banner=='This is GFtoDOVER, Version 0.3' {printed when the program starts}
2) @d resolution==384.0 {pixels per inch, as used in gf files}
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/9L
1) by \MF; and, in fact, the file formats have a lot in common.
1) It is therefore not surprising that \.{GFtype} is identical in many
1) respects to the \.{DVItype} program.
1) A \.{GF} file is a stream of 8-bit bytes that may be
**** File 2) GFD.WEB[MF,ALS]/6P/9L
2) by \MF. and, in fact, the file formats have a lot in common.
2) A \.{GF} file is a stream of 8-bit bytes that may be
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/29L
1) first. Each ``character'' consists of a |boc| command, followed by any
1) number of other commands that specify ``black'' pixels,
1) followed by an |eoc| command. The characters appear in the order that \MF\
**** File 2) GFD.WEB[MF,ALS]/6P/27L
2) first. Each ``character'' consists of a |boc| or a |boc1|
2) command, followed by any
2) number of other commands that specify ``black'' and ``white'' pixels,
2) followed by an |eoc| command. The characters appear in the order that \MF\
***************
1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 6,6
**** File 1) GFTODO.WEB[MF,SYS]/6P/34L
1) |boc| command, or by a |post| command; in the latter case, there are no
1) more characters in the file, and the remaining bytes form the postamble.
**** File 2) GFD.WEB[MF,ALS]/6P/33L
2) |boc| or a |boc1|
2) command, or by a |post| command; in the latter case, there are no
2) more characters in the file, and the remaining bytes form the postamble.
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/74L
1) Please note that \.{GFtoDOVER} continues to use the values of |m| and |n|
1) as herein defined and does not replace these values in the actual code by
1) the values $m'=m-|min_m|$ and $n'=|max_n|-n$ as has been done in \.{GFtype}
1) and perhaps other programs that follow the \.{GFtype} example.
1) @ Here is a list of all the commands that may appear in a \.{GF} file. Each
**** File 2) GFD.WEB[MF,ALS]/6P/74L
2) @ Here is a list of all the commands that may appear in a \.{GF} file. Each
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/118L
1) \yskip\hang|eoc| 68. End of character: All pixels blackened so far
1) constitute the pattern for this character. In particular, a completely
1) blank character might have |eoc| immediately following |boc|.
1) \yskip\hang|skip0| 69. Decrease |n| by 1 and set |m←min_m|,
1) |paint_switch←white|. \ (This finishes one row and begins another,
1) ready to whiten the leftmost pixel in the new row.)
1) \yskip\hang|skip1| 70 |d[1]|. Decrease |n| by |d+1|, set |m←min_m|, and set
1) |paint_switch←white|. This is a way to produce |d| all-white rows.
1) \yskip\hang|@!skip2| 71 |d[2]|. Same as |skip1|, but |d| can be as large
1) as 65535.
1) \yskip\hang|@!skip3| 72 |d[3]|. Same as |skip1|, but |d| can be as large
1) as $2↑{24}-1$. \MF\ obviously never needs this command.
1) \yskip\hang|new_row_0| 73. Decrease |n| by 1 and set |m←min_m|,
1) |paint_switch←black|. \ (This finishes one row and begins another,
1) ready to {\sl blacken\/} the leftmost pixel in the new row.)
1) \yskip\hang|@!new_row_1| through |@!new_row_165| (opcodes 74 to 238). Same as
1) |new_row_0|, but with |m←min_m+1| through |min_m+165|, respectively.
1) \yskip\hang|xxx1| 239 |k[1]| |x[k]|. This command is undefined in
**** File 2) GFD.WEB[MF,ALS]/6P/113L
2) \yskip\hang|boc1| 68 |c[1]| |@!del_m[1]| |max_m[1]| |@!del_n[1]| |max_n[1]|.
2) Same as |boc|, but |p| is assumed to be~$-1$; also |del_m=max_m-min_m|
2) and |del_n=max_n-min_n| are given instead of |min_m| and |min_n|.
2) The one-byte parameters must be between 0 and 255, inclusive.
2) \ (This abbreviated |boc| saves 19~bytes per character, in common cases.)
2) \yskip\hang|eoc| 69. End of character: All pixels blackened so far
2) constitute the pattern for this character. In particular, a completely
2) blank character might have |eoc| immediately following |boc|.
2) \yskip\hang|skip0| 70. Decrease |n| by 1 and set |m←min_m|,
2) |paint_switch←white|. \ (This finishes one row and begins another,
2) ready to whiten the leftmost pixel in the new row.)
2) \yskip\hang|skip1| 71 |d[1]|. Decrease |n| by |d+1|, set |m←min_m|, and set
2) |paint_switch←white|. This is a way to produce |d| all-white rows.
2) \yskip\hang|@!skip2| 72 |d[2]|. Same as |skip1|, but |d| can be as large
2) as 65535.
2) \yskip\hang|@!skip3| 73 |d[3]|. Same as |skip1|, but |d| can be as large
2) as $2↑{24}-1$. \MF\ obviously never needs this command.
2) \yskip\hang|new_row_0| 74. Decrease |n| by 1 and set |m←min_m|,
2) |paint_switch←black|. \ (This finishes one row and begins another,
2) ready to {\sl blacken\/} the leftmost pixel in the new row.)
2) \yskip\hang|@!new_row_1| through |@!new_row_164| (opcodes 75 to 238). Same as
2) |new_row_0|, but with |m←min_m+1| through |min_m+164|, respectively.
2) \yskip\hang|xxx1| 239 |k[1]| |x[k]|. This command is undefined in
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/172L
1) \yskip\hang|@!char_loc0| 246 |c[1]| |dx[4]| |w[4]| |p[4]|.
1) Same as |char_loc|, except that |dy| is assumed to be zero.
1) \yskip\hang|pre| 247 |i[1]| |k[1]| |x[k]|.
**** File 2) GFD.WEB[MF,ALS]/6P/173L
2) \yskip\hang|@!char_loc0| 246 |c[1]| |@!dm[1]| |w[4]| |p[4]|.
2) Same as |char_loc|, except that |dy| is assumed to be zero, and the value
2) of~|dx| is taken to be |65536*dm|, where |0≤dm<256|.
2) \yskip\hang|pre| 247 |i[1]| |k[1]| |x[k]|.
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/178L
1) 130. The other information is merely commentary; it is not given
1) special interpretation like \\{xxx} commands are. (Note that \\{xxx}
**** File 2) GFD.WEB[MF,ALS]/6P/180L
2) 131. The other information is merely commentary; it is not given
2) special interpretation like \\{xxx} commands are. (Note that \\{xxx}
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/188L
1) @d gf_id_byte=130 {identifies the kind of \.{GF} files described here}
1) @ Here are the opcodes that \.{GFtoDOVER} actually refers to.
1) @d paint_0=0 {beginning of the \\{paint} commands}
**** File 2) GFD.WEB[MF,ALS]/6P/190L
2) @d gf_id_byte=131 {identifies the kind of \.{GF} files described here}
2) @ Here are the opcodes that \.{GFtoDO} actually refers to.
2) @d paint_0=0 {beginning of the \\{paint} commands}
1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 6,6
**** File 1) GFTODO.WEB[MF,SYS]/6P/195L
1) @d boc=67 {beginning of a character}
1) @d eoc=68 {end of a character}
1) @d skip0=69 {skip no blank rows}
1) @d skip1=70 {skip over blank rows}
1) @d new_row_0=73 {move down one row and then right}
1) @d xxx1=239 {for \&{special} strings}
**** File 2) GFD.WEB[MF,ALS]/6P/197L
2) @d paint2=65
2) @d boc=67 {beginning of a character}
2) @d boc1=68 {abbreviated |boc|}
2) @d eoc=69 {end of a character}
2) @d skip0=70 {skip no blank rows}
2) @d skip1=71 {skip over blank rows}
2) @d skip2=72 {skip over blank rows}
2) @d new_row_0=74 {move down one row and then right}
2) @d new_row_164=238 {move down 164 rows and then right}
2) @d xxx1=239 {for \&{special} strings}
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/269L
1) Pointer |p| might be |-1| if the character exists in the \.{TFM} file
**** File 2) GFD.WEB[MF,ALS]/6P/274L
2) @↑oriental characters@>@↑Chinese characters@>@↑Japanese characters@>
2) Pointer |p| might be |-1| if the character exists in the \.{TFM} file
***************
**** File 1) GFTODO.WEB[MF,SYS]/6P/277L
1) comes next; this currently equals~130, as in the preamble.
1) The |i| byte is followed by four or more bytes that are all equal to
**** File 2) GFD.WEB[MF,ALS]/6P/284L
2) comes next; this currently equals~131, as in the preamble.
2) The |i| byte is followed by four or more bytes that are all equal to
***************
**** File 1) GFTODO.WEB[MF,SYS]/8P/73L
1) @d thirty_eight_cases(#)==thirty_two_cases(#),four_cases(#+32),#+36,#+37
1) @d sixty_four_cases(#)==thirty_two_cases(#),thirty_two_cases(#+32)
1) @p function first_par(o:eight_bits):integer;
**** File 2) GFD.WEB[MF,ALS]/8P/73L
2) @d thirty_seven_cases(#)==thirty_two_cases(#),four_cases(#+32),#+36
2) @d sixty_four_cases(#)==thirty_two_cases(#),thirty_two_cases(#+32)
2) @d one_sixty_five_cases(#)==
2) sixty_four_cases(#), sixty_four_cases(#+64),
2) thirty_seven_cases(#+128)
2) @p function first_par(o:eight_bits):integer;
***************
**** File 1) GFTODO.WEB[MF,SYS]/8P/80L
1) paint1+1,skip1+1,xxx1+1: first_par←get_two_bytes;
1) paint1+2,skip1+2,xxx1+2: first_par←get_three_bytes;
1) xxx1+3,yyy: first_par←signed_quad;
1) boc,eoc,skip0,no_op,pre,post,post_post,undefined_commands: first_par←0;
1) sixty_four_cases(new_row_0), sixty_four_cases(new_row_0+64),
1) thirty_eight_cases(new_row_0+128): first_par←o-new_row_0;
1) end;
**** File 2) GFD.WEB[MF,ALS]/8P/83L
2) paint2,skip2,xxx1+1: first_par←get_two_bytes;
2) paint1+2,skip1+2,xxx1+2: first_par←get_three_bytes;
2) xxx1+3,yyy: first_par←signed_quad;
2) boc,boc1,eoc,skip0,no_op,pre,post,post_post,undefined_commands: first_par←0;
2) one_sixty_five_cases(new_row_0): first_par←o-new_row_0;
2) end;
***************
**** File 1) GFTODO.WEB[MF,SYS]/9P/1L
1) @* Translating the input commands. This section will be largely concerned with
1) the reading of the input commands and the storing of this information in a
**** File 2) GFD.WEB[MF,ALS]/9P/1L
2) @* Translating the input commands.
2) This section will be largely concerned with
2) the reading of the input commands and the storing of this information in a
***************
**** File 1) GFTODO.WEB[MF,SYS]/9P/13L
1) sixty_four_cases(new_row_0), sixty_four_cases(new_row_0+64),
1) thirty_eight_cases(new_row_0+128):
1) @<Translate a |new_row| command@>;
1) @t\4@>@<Cases for commands |no_op|, |pre|, |post|, |post_post|, |boc|,
**** File 2) GFD.WEB[MF,ALS]/9P/14L
2) one_sixty_five_cases(new_row_0): @<Translate a |new_row| command@>;
2) @t\4@>@<Cases for commands |no_op|, |pre|, |post|, |post_post|, |boc|,
***************
**** File 1) GFTODO.WEB[MF,SYS]/11P/20L
1) @<Make sure that the end of the file is well-formed@>;
1) end;
**** File 2) GFD.WEB[MF,ALS]/11P/20L
2) end;
***************
**** File 1) GFTODO.WEB[MF,SYS]/11P/41L
1) @ When we get to the present code, the |post_post| command has
**** File 2) GFD.WEB[MF,ALS]/11P/39L
2) @!del_m:integer; {used to hold |gf| parameter}
2) @!del_n:integer; {used to hold |gf| parameter}
2) @ When we get to the present code, the |post_post| command has
***************
**** File 1) GFTODO.WEB[MF,SYS]/13P/52L
1) begin if o≠boc then
1) bad_gf('byte ',cur_loc-1:1,' is not boc (',o:1,')');
1) print(' [');
1) @<Pass a |boc| command@>;
1) if not do_char then bad_gf('char ended unexpectedly');
**** File 2) GFD.WEB[MF,ALS]/13P/52L
2) begin if (o<boc) or (o>boc1) then
2) bad_gf('byte ',cur_loc-1:1,' is not boc (',o:1,')');
2) print(' [');
2) @<Pass a |boc| or a |boc1| command@>;
2) if not do_char then bad_gf('char ended unexpectedly');
***************
**** File 1) GFTODO.WEB[MF,SYS]/13P/61L
1) {|if (char_code=105) then tabulate;|} {use if on-line display of 105 is desired}
1) @<Save data for the |oc| file@>;
**** File 2) GFD.WEB[MF,ALS]/13P/61L
2) {|if (char_code=105) then tabulate; {use if on-line display of 105 is desired}|}
2) @<Save data for the |oc| file@>;
***************
1) GFTODO.WEB[MF,SYS] and 2) GFD.WEB[MF,ALS] 7-01-85 10:10 pages 13,13
**** File 1) GFTODO.WEB[MF,SYS]/13P/84L
1) char_code←signed_quad;
1) p←signed_quad;
1) c←char_code mod 256;
1) if c<0 then c←c+256;
1) print(c:1);
1) if char_code≠c then
1) print(' in family ',(char_code-c) div 256 : 1);
1) min_m_stated←signed_quad; max_m_stated←signed_quad;
1) min_n_stated←signed_quad; max_n_stated←signed_quad;
1) p_save←max_m_stated;
1) skip_flag←true; {a |paint| commasnd to follow will be to paint white}
1) if char_ptr[c]≠p then
**** File 2) GFD.WEB[MF,ALS]/13P/84L
2) if o=boc then
2) begin
2) char_code←signed_quad;
2) p←signed_quad;
2) c←char_code mod 256;
2) if c<0 then c←c+256;
2) print(c:1);
2) if char_code≠c then
2) print(' in family ',(char_code-c) div 256 : 1);
2) min_m_stated←signed_quad; max_m_stated←signed_quad;
2) min_n_stated←signed_quad; max_n_stated←signed_quad;
2) end
2) else begin
2) char_code←get_byte;
2) p←-1;
2) c←char_code;
2) print(c:1);
2) del_m←get_byte; max_m_stated←get_byte;
2) del_n←get_byte; max_n_stated←get_byte;
2) min_m_stated←max_m_stated-del_m;
2) min_n_stated←max_n_stated-del_n;
2) end;
2) m←min_m_stated; n←max_n_stated;
2) p_save←max_m_stated;
2) skip_flag←true; {a |paint| command to follow will be to paint white}
2) if char_ptr[c]≠p then
***************
**** File 1) GFTODO.WEB[MF,SYS]/13P/99L
1) m←min_m_stated; n←max_n_stated;
1) p_c←0; p_val←white; p_array←0; paint_array[n,p_c+1]←0;
**** File 2) GFD.WEB[MF,ALS]/13P/113L
2) p_c←0; p_val←white; p_array←0; paint_array[n,p_c+1]←0;
***************